import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function queryPage(params?: object) {
  return http.request<HttpResult>("get", "/esflow/def/form/perm/getpage", {
    params: params
  });
}

export function queryList(params?: object) {
  return http.request<HttpResult>("get", "/esflow/def/form/perm/getlist", {
    params: params
  });
}

export function addObj(params?: object) {
  return http.request<HttpResult>("post", "/esflow/def/form/perm", {
    data: params
  });
}

export function getObj(id?: string) {
  return http.request<HttpResult>("get", `/esflow/def/form/perm/${id}`);
}

export function delObjs(ids?: object) {
  return http.request<HttpResult>("delete", `/esflow/def/form/perm/${ids}`);
}

export function putObj(params?: object) {
  return http.request<HttpResult>("put", "/esflow/def/form/perm", {
    data: params
  });
}
